<?php
use yii\helpers\Html;
use yii\helpers\Url;
/* @var $this \yii\web\View */
/* @var $content string */

$mktWapCommonAsset = \frontend\assets\MktWapCommonAsset::register($this);

$this->beginContent('@frontend/views/layouts/mkt_base.php')

?>

<div data-role="page" id="page" style="height: 100%;">	

<div id="mainTab" class="weui_tab">
	<div class="weui_tab_bd">
        <?php
            switch (yii::$app->controller->getRoute()) {
                case 'wap/work-home':
                    $contentId = 'work';
                    break;
                case 'wap/market-home':
                case 'wap/market-list':                
                    $contentId = 'market';                
                    break;
                case 'wap/resourcelib-home':
                case 'wap/resourcelib-member':      
                case 'wap/resourcelib-area':      
                case 'wap/resourcelib-gift':      
                case 'wap/resourcelib-cash':   
                case 'wap/resourcelib-generalize':   
                case 'wap/resourcelib-service': 
                    $contentId = 'lib';  
                    break;
                case 'wap/self-home':
                case 'wap/self-friend-myfriend':      
                case 'wap/self-friend-message':      
                case 'wap/self-friend-apply':      
                case 'wap/self-friend-attention':   
                case 'wap/self-post-mypost':      
                case 'wap/self-post-message':      
                case 'wap/self-post-collect':                                          
                    $contentId = 'self';                
                    break;
                default:
                    $contentId = 'market';                                
                    break;
            }            
        ?>
        
        <div id="<?php echo $contentId; ?>" class="weui_tab_bd_item" style="display: block;">
        <?php echo $content ?>
        </div>
        
    </div>
	
    <div class="weui_tabbar">
		<a href="<?php echo Url::to(['wap/market-home', 'page'=>1]); ?>" class="weui_tabbar_item <?php echo $contentId == 'market' ? 'weui_bar_item_on' : ''; ?> ">
			<div class="weui_tabbar_icon">
				<img class="market" src="resources/images/app/market.png"/>
				<img class="market_on" src="resources/images/app/market_1.png"/>
			</div>
			<p class="weui_tabbar_label">市场人</p>
		</a>
		<a href="<?php echo Url::to(['wap/work-home', 'page'=>1]); ?>" class="weui_tabbar_item <?php echo $contentId == 'work' ? 'weui_bar_item_on' : ''; ?> ">
			<div class="weui_tabbar_icon">
				<img class="work" src="resources/images/app/work.png"/>
				<img class="work_on" src="resources/images/app/work_1.png"/>
			</div>
			<p class="weui_tabbar_label">工作圈</p>
		</a>
		<a href="<?php echo Url::to(['wap/resourcelib-home']); ?>" class="weui_tabbar_item <?php echo $contentId == 'lib' ? 'weui_bar_item_on' : ''; ?> ">
			<div class="weui_tabbar_icon">
				<img class="lib" src="resources/images/app/lib.png"/>
				<img class="lib_on" src="resources/images/app/lib_1.png"/>
			</div>
			<p class="weui_tabbar_label">资源库</p>
		</a>
		<a href="<?php echo Url::to(['wap/self-home']); ?>" class="weui_tabbar_item <?php echo $contentId == 'self' ? 'weui_bar_item_on' : ''; ?> ">
			<div class="weui_tabbar_icon" style="padding-left: 8px;">
				<img class="self" src="resources/images/app/self.png"/>
				<img class="self_on" src="resources/images/app/self_1.png"/>
			</div>
			<p class="weui_tabbar_label">我</p>
		</a>
    </div>
</div>

</div>

<?php $this->endContent() ?>

